package com.example.SpringBoot_demo.service.impl;

import com.example.SpringBoot_demo.bean.Log;
import com.example.SpringBoot_demo.mapper.LogMapper;
import com.example.SpringBoot_demo.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ILogServiceImpl implements ILogService {

    @Autowired
    private LogMapper logMapper;

    @Override
    public List<Log> viewLog() {
        return logMapper.viewLog();
    }

    @Override
    public void createLogs(String logrecord) {
        int numb=logMapper.countNumb()+1;
        logMapper.createLog(Integer.toString(numb),logrecord);
    }
}

